Added error checks for shortest path algorithms, as well as position information in node class