More work done on search function.