Improvements to the tex snippets by rene vergara.
Puppet style fixes by JHaals