Montage fix

This one looks better. It makes some small fixes to your PR.
I assume this is the old function in its new correct place?