Refactoring in preparation of the move from a 2d vector space to a 3d
vector space.