Handle variables a bit nicer in GenerateEntityCommand