Moved layer & node position calculation into the layout