More work...cleanup, trying to make it cleaner and easy to maintain.