Moving as much as possible into the node scripts.