Made ID handling more automatic, refactor metadata for nodes