Remove currently unused search_spec
Fix variable names and method call for readibility