added WS Manager as per http://tools.ietf.org/html/rfc6455#section-4.1 & minor bugfixes