added comments to all structs and classes

+ a few small changes.