Finished MemManager and commented code