Added option to specify whether the lengths of the functional sections
should be optimized.