Cleaned up the script and added 'use strict'