Switched some latex references to use \secref,\eqnref,etc.
Formatting.