Added TypeScript definitions, edit mode