Changed task insert/updates to be dynamic