NPC movement implemented

Simple shortest distance movement implemented. Some bugs fixed.