Javascript/html code cleanup and comments