Reduce api complexity and update tests.