added flask tests and latest app flask files

took a bit of experimenting, but it seems finally to work.