WIP: a bit of cleanup fixes a few mistakes