Refactoring: Separation of API and Platform