Use local scoping for function variables