Cleaned up node.shutdown() method.