refactored controllers creation; some improvements