Updated documentation

I've added type documentation for the main classes, and a diagram to give an idea of the relationship between them.