Refined implementation of subscriptions
Make Scala unit test work