flex: modernize
flex: add test
flex: update 2.5.37 bottle.