Merged Branches and Cleaned up Code