Move HTML stratup function to a sepearte javascript file