Lots of Code Cleanup.