Made all functions global. Need to link them