adds configuration and refactors modules