Sweep some files and improve codes