Refactor require