Modules refactor