new scheme for searching, cleanups