doing some moving of things around and cleaning up code