More Code Cleanup. Also added Memory Cleanup with all pointers