Refactoring to platform solution