Add the inline function, and many comments