This is great. Thanks so much.
For anyone wondering - it's also relatively easy to convert to 3D by just changing the node types from 3D to 2D and the extends thing at the top of the script.