Would be great to change `scope.messages` to `scope.messageMap`
and `showerr`, `showsucc` to `showErr`, `showSucc`