Implemented caching
Added Typescript support