post-merge refactoring: made names & interfaces more consistent.
Modified tests to pass correctly and adhere to new API.