Moved var into function scope, added contributor.
Updated demo with scope option.