Small bug fix.
Simple memory managment added (mostly wrappers for libc).