Added extern to the function prototypes