Tidy up. Added a test for buildRenderer()