Some work on stdin stuff