Added basic Subscription-Support and did some  refactoring