Refactor into iffe and use strict