Replaced ES5 functions with analogous core.ts ones.