Tighten code