Moved function prototypes into the header