refactored register report code for readability
further improvements for readability
more refactoring for readability and correctness
In register report show all accounts that have transactions in a group

Previously only accounts whose amounts had changed from past group were
shown.

This change has also simplified the code a lot.
minor: changed names of variables