Improved code structure and added .gitignore.
Merge branch 'differentstreams' of https://github.com/snowp/rstream into differentstreams

Conflicts:
	main.cpp
	stream.h