Lifetime and scope of variables