Reasonably complete. Passes all tests.
merge