Changed inline functions to prototypes