Major code cleanup
Major Code Cleanup