Refactored controllers dinamically