added multiple tests and fixes, esp to piping (progress #109)