Initial DOM javascript refactoring
Initial DOM javascript refactoring