General Code Cleanup and Adding Regions