You also need a 'use strict'; at the beginning of the file