Surgical treatment of spinal deformities