Improve node splitting. Bugfixes.