Issue #193: add a summary at bottom of view, refactor code