Rendering changes and some other cleanup