moved some enumeration constants to new file and added some useful functions
more stuff in preperation for adding in object handling
I think I have sorted all the memory leaks now.
Last commit was awful, didn't think any of that through at all. I have now fixed all the memory leaks and fixed the access violations caused by trying to fix memory leaks. Phew!