Ws review

Jocelyn's code review, fixes and improvements.