Fix typos and update doc comments