clean up tests
Add documentation for map, flatMap, join, collect