Changed latex function tests to work with python3
Minor tweaks