Tidy up local variable access