reorganized code and corrected functions and main
Merge branch 'master' of https://github.com/Ommac/VStream