Added various other small bits of formatting, moved code.tex back into main template