add ability to configure root name

type changes for compilation with latest TypeScript