More work on value setting and scoping