fixed target issue

And began working on pathfinding.
Dont use it yet!