Setting length of arrays before adding items
streams now get checked for automatic flushing more often
interface changes, disabled debug messages, changes to comments
Merge branch 'master' into pkovac