Updated optimizations and added Dr. Margalit's cycle notation