Refactoring the entry point