merging work from typescript dev branch