Implemented revert().
Trivial stylistic changes (indentation and capitalization).