Changes from old/messed up freelists branch