Added heap contraction and fixed an oversight in expansion where I did not check for the case where the last chunk was *not* free.