Revert "syncing up master" by Jon

This reverts commit 9b624ad8f90ccb16eea9700268429650b8245c39, reversing
changes made to 010b35bd6090061848cac6ef01c355851704c3c0.
Adding some changes that fell out during Jon's revert