various refactoring to focus in on how to support client and server ws
policy.