Adding documentation and fixing typos