Adds ws cleanup.