Add --transform and --command tests, perform related fixes