Upgrade to 2.4

I think this should be included in a new branch to keep 2.0 compatibility.