Use Freedom Typescript Api

Hi Trevor, this is a followup on your CL to use the npm typescript API module. Does a little naming cleanup too.