Fixed up Node to use ints and longs where appropriate and added some methods necessary for the solver.