Better Makefile, fixes minor things in tex