More duplicate EF query removal, update tests