Refactor import into modules