added rudimentary search route and search flag.
clean up