Fix some compile errors
Move some npc code

I miss eclipse