Various cleanups.

Using Array.isArray instead of instanceof, making `undefined` an argument for the anonymous function, using Object.create when inheriting from Dict.