Adding more comments and correcting typos