Added documentation for most of the things.