object api refactoring and cleanup