Basic Typescriptish support and minor fixes