further refactored and simplified account.js - no need for accounts object at all