[wip] fixing memory access problems
Added SaveWhiskers matlab function.