API and documentation refactoring.