Refactor initial setup for module
General refactor