Added constraints to deleting function: only activities which are at status "created" can be deleted.