Re-think algorithm, no need to have node class :S