Refactors some things to match the pattern followed elsewhere.