Clean up the subscription code