Moved things around, refactored