use node streams instead of carrying data around
cleanup / comments
split out webapp and stream maintenance code
fix channel termination