refactor some classmethods into instance methods. beginnings of the search api