cleanup, removed unnecessary stuff
changes to the Flow datatype and split Level to two different types
small name change, a to tag
auxiliary module added, upgrade function