Generated graph classes, to make the code more type safe

This achieves also a faster program start
Changed the category tree model

The tree model now uses the edges of the graph to navigate from one tree
node to another. Additionally, blacklisted tree nodes will be saved and
reused when the blacklisting is revoked.