Cleanup and fixed search