Updated markup and js refactored