First attempt at doing some real memory management. Lots of console spam if you build with the DEBUG compiler command turned on!