Moved all methods of DOM module to prototype