Refactoring to remove the intermediate intend of the application