Minor refactor

No new functionality, didn't bother repackaging