Refactor define to require