Factor out the code needed for maintaing a wireframe model from the rest of the drawing code.