Latex template refactor updates