Rework Base class and queue handling and binding.
Add some change to handle gracefull stop in Stream class.