fixed some typos and coding style