Added NPC builder and functions required for it.
added NPC builder and related functions