Added cleanup functionality
Condensed the command chain
fix latexcompile typo