Some 3.x'ish modifications