Yet more variables, and a fair bit of housekeeping