Added some exception classes and added a search method.