WIP: Almost done I swear.

 * Deglobalized everything I could.  Found typos and fixed them.
 * Hopefully this will mostly work on first try.
WIP: Very very close...