Some refactoring in DevisController