fix indentation and make helpers static inline