refactoring
Moved things around.