added stocknodes class and some minor cleanups