tweaked build script; add basic support for STREAM sockets; code clean-up; messed with docs