Updated AccountService to use factory