Moved contact query into the model as much as possible and created rspec tests accordingly, cucumber still passing so functionality is still the same. Added persent signs for searching so it searches around the params for contacts.