Reorder for better JSLint compat.; begin listener work