feature/subscription

Issue #7.
It's used by the API for handling the subscriptions.