changed output from stringoutputstream to byteoutputstream + some
improvemenets and cleanup
Merge branch 'develop' of github.com:bendisposto/prob2 into develop