Search functions expanded

Still debugging, but you can get the idea