Add 'inline' keyword to functions missing it
Improve comments a bit