Moved code to .c files

Causes warnings on constructor, but still works. Will work on fixing
those before moving on.