Refactoring subscribe/3 and unsubscribe/1