refactored app show/refresh-view code a bit