Refactoring search class, adding mongoid to integration and putting gems in gem file