Move some things into renderercommon