Search function almost complete.