First draft, untested, with code to make connections between nodes.