Port to 3.3 + cleanup