Added logging and name() function in DOM