Refactor Accounts Controller