Fixed memory bugs, implemented free, commented multitask.c, and did some space optimizations