fixed purge database task and added a couple of features to SubscribedTask