Closes #12 - TypeError: Cannot read property 'action' of undefined
Added 'use strict' and replaced some '==' with '==='.