Rebased on top of a more recent rust version