moving search functions from editor module, cleaning up