remove some cruft so it has a chance to be fast