Added name dictionary and some primitive functions

Needs lots of testing