Fix mistake in longest script finding algorithm.
Simplify choreographer load code.