getErrors(), toNodes() and some tests are added