rm multiple dots in file names
fix gap/insert decision ,code cleanup