Refactoring to be hosted