getErrors(), toNodes() and some tests are added
'Only variables should be passed by reference' fix in toArray()