Broke it up into classes

Moved all the classes out of main file, implemented a basic renderer function.