More refactoring and streamlining of the API.