Cleanup and minor fix

This includes a minor cleanup to newton.h (some renaming of variable to make it easier to read -- let me know if you don't like something).  The second commit fixes compilation for me.