Moved prototypes to .h file