js code tidying
return self in search class to allow method chaining