Ws review

Jocelyn code review and various fixes and improvements