refactor data and subscriptions
Merge pull request #9 from mettienne/refactor-data

refactor data and subscriptions