Rewritten more efficiently, node definitions now make more sense (and aliased to stay compatible with older versions)