Search refactor and instrument filter

Refactored search by building a build sql query function which returns
the query object. This is with a view of working with the data in and
outside the returned xml format for google maps. Also worked on code
fragmenting the search component.