Rendering directly from binary format

This also cleans up some unused code.