added support to delete workflow definitions, optimizations