Re-did the allocate lane functions, should be more atomical(?) now