Moved code from main into a game class

Tidied a lot of the code
Renamed variables and functions to better names
Moved xml docs into xml dir
Renamed function, closes #27