node count wrapper; minor cleanup