Stuff seems to be working with the grants changes

In the reference server I changed the way grants were handled, most
stuff appears to be working with that now. Also updated to the latest
version of Typescript (1.0RC), made changes accordingly