check allocation, remove cruft