Code Fixes

Code Fixes and Clean Up