some typos and source code cleaning