some cleanup and fixes... check tests still break