reorganizing the tex file to divide into separate files