Changed some scoping issues and updated the search classes