Separating out the client logic from the HTML