Fixed up the LinkedNode class and rewrote main to test it.