Update to PG database, add / adjust supporting methods and scopes, implement balance_by_date