Reduce dynamic allocation
Created by: Smattr
This pull request avoids rounding up the allocation size when already word-aligned, as previously discussed. Sorry it took a while to get back to this one. I've included the removal of an unused variable I spotted along the way. Thanks!