Improved documentation with class diagrams, fixing spelling errors etc.