Split out the code into it's own files

R# is awesome