Fixed bug with max words/wordSize thresholds, added listener for node selection