Rename templates to managers

Since we only use it for managers, calling them templates makes no sense.
Splits code into files

The Node class now has its own file and two helper static methods. The
CircularDependencyError class gets its own file too. Everything config related
goes to Config.py, as well as helpers functions and classes manipulating the
config data.