Code Cleanup, Etc.

Working on test fixes also.