Added Various Memory Management Stuff