Doing a little more refactoring and cleanup.