Wrapped script in anonymous self-executing function.  Added use strict.  Declared splitWords before invocation.