add missing header and inline specifier, remove static functions