Switched to TypeScript completely and fixed some typescript related issues on windows/webstorm. fixes #13