Fixed strict equality signs in the TS code.
Added support for directives. Fixed the .NET host hanging.