Move some classes from rendering to decoding