simpler renderer and some cleanup