[wip] some cleanup; mostly in testing