Started refactoring/migration towards API independence