Rename to 'core', improve M.typeof and M.toArray