Refactored module setup.