[COSM] move inline function at header and cosmetic comments