wip: various minor cleanup