Refactor

Code cleanup time. Moving some files around, giving some code its own
file.
Refactor

Moving some files around, giving some code its own file.