added indices and refactored per 9/10 code review

updated search by query scope

moved find carts logic into a model scope and updated building of carts to use a model method

refactored per code review 9/10