a bunch of cleanup preparing to bring this branch back onto master