Fix typos and coding style