Various bugfixes and updated for account and envelope amounts