Refactoring and cleaning mango_surveys_router plugin