Working on accounts and refactored Query