Added more control over the node distribution and z-ordering, see #4