Little improvements it style, comments and documentation.
Fixed project references.