Small improves in WS, unit tests