Cleaned up code.
Additional clean-up work.