Cleaning up tex code.