No more flickering when moving nodes

This took way too long, but now I know the general solution.