Part two of the grand refactoring.
I forgot to git add ., so this includes all the changes.y