fixing modules names and improving code organization