patches a bit (author incorporated a fair number of them, and made even more cross-platfrm portability improvements). I'll deal with any packaging changes tomorrow.
Ok'ed by: asami