Factor html templates out of compiler.js