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.
`v/beta` creates a copy. I don't think that you still need the original `v` afterwards, but I could be wrong. Anyway, the following preserves `v` and puts the correct vector in `vm[1]` without new allocation (provided that you allocated them before as in the comment on line 43:
```julia
scale!(copy!(vm[1],v),1/beta)
```