Refactored/put under test code to determine new apis