Cleaning up interfaces.

Checking that all tests pass after rebasing #218 over master