added cursor control and refactored node routing