Changes to elongation.m to make it actually work.