Converted functions to static inline functions