Made the Node class thread safe and a little more java friendly