Updated to work with TypeScript 1.01