Finished first version of speedup generation.