Changing the type function broke the createStructure in kxDOM (since type([]) now returns 'array' instead of 'object'). Fixed it by adding a case for arrays, with its original functionality