Bugfix: don't set min xfw to 6.
Stop using terrible loop conditions.
Add vectorisation test.