Added ApiFlagController, added Flag model, changed flag table