code cleanup and search config added