Still minor refactoring, moving functions around