Finished refactoring into relevant classes, core functionality will follow