Added some comments to the ceiling optimization code