factored out rendering code from Terrain class into new subclass