Making JS more readable in HTML