I've been reimplementing CycleWS functionality, so I've refactored to use that.