Bit of API refactoring