Added some basic memory manipulation functions.
Reintroduced the memory allocator.
(I haven't really changed since last version)