Refactor subscription implementation