some typo fixing, more script cleaning