use strict mode, fix var references