Some refactoring
Basic restructuring
Tests passing after refactor