Separate main.tex into three separate files.