Refactoring/renaming some APIs for consistency and better usability.