Remove console logs and hoist var.