remove flask reference and fix some tests