Performed preliminary fixes to library to work with new TypeScript .9.

- Found issue with module Aliasing via import in external files that prevents me from aliasing EndGate as eg.  Will have to make entire library run with "eg" instead of EndGate until bug https://typescript.codeplex.com/workitem/1182 is fixed.
Finished modifying samples and library to use the short hand form of endgate