Opt branch

@acroy, thanks for the nice work. I created a pull request, since this facilitates adding line comments to the code. Hence, see below for further comments of further potential comments.
You are still creating `m+1` new vectors in every iteration of `tk<tf`. I don't know if you need to go through many iterations. It could be better to allocate the vectors beforehand and then store the result in place. So here you would need to add
```julia
for i=1:m+1
  vm[i]=similar(v)
end
```