cleanup lib import and added rootNode wrapper