Refactoring. Broke some APIs