Fix a few things, add flag command