Add cleaning dataset functionality to ws.
Add test for cleaning functionality.