big refactoring... things compile - time to start testing