Manual merge of Zeno-'s changes, with several revisions.
Lots of values moved to config.lua, split nodes and functions into their own files.