test and fix a bunch of things