Improved documentation and fixed typos