Refactor daemon.attach()

Also makes streamConfig Pipe methods not return error, since there was
no error for them to be able to return anyway.
I'll take a look, I didn't really change this part.