Revert "Partial commit. Doesn't compile."

This reverts commit 3eb0075f79e8ff861488820f82e1f3bf95c9309e.