Cleaning the renderer and small fixes