Merge pull request #521 from gsn/master

Merged from beta.
Copps (216). Style and functionality fixes
Merge pull request #524 from gsn/master

Merged from beta.
Merge pull request #525 from gsn/test

Merged from test.