more extended w mode debugging + cleanup