Search method revision and code clean up