Split rendering out of core file