Ensure backwards compatiblity

This is a big commit... I modified/added unit tests to
test both the old and new interfaces.