Add window resizing and fix path visualization