Changes to appease the linker

Move function definitions into a .h file