More work to get search working

Still not done yet.