refactored and completed some util.ws classes