Minor refactors and such.