Now works correctly for a board size of 1 or 2.

Very exciting! Got it working for more things. Ran into problems
verifying the level in the xml file but gave up on that for now.
Usability over robustness for now. (No SegFaults!)