Improved start and sinknode handling in code