Make set return value to allow chaining, also added comments/tidy.
Code style fixes.
Merge pull request #2 from orangemug/make_set_return_value

Make set return value to allow chaining, also added comments/tidy.