Made program more robust by allowing for additional account types.
Added proper handling for opening balances.