Upgrade grunt, add typescript version of library, partial fix for test race errors