Move stuff to .cpp files

I cleaned up the project a bit by moving things to their own files.
The header files are less of a mess now.
Implement exceptions

I haven't tested it, and I should feel bad, and I do.