Added some code that will hopefully support NPC's

Thoughts?