Refactored scheduling, moved some classes around