Refactor the BAllocThreads, giving parts of it some descriptive methods