Remove immediate function as var declarations are scoped to module level by default.