break out handler function
make indentation a bit saner
remove redundant 'else' after return
DRY tail call
remove unnecessary branch
remove some blank lines
move else such that it can be shortcut
shortcut else after return
Merge pull request #442 from mk270/tva/update

Tva/update - tidy view/applications update() function