Update from... 2012!

These changes were added in AngieHinrichs' fork and need to be folded back in here.