Api refactoring.