Various changes

Flags administration added.
Reorganized project folders and namespaces.