Refactored and created 2 modules