Moved expression evaluation logic into controller