Fixed flags again. Flags in the comments are now using a new implemented function, which will make it simpler to extend it.
Removed leftovers of the old code for the flags.
New dev version.