Delegate more tasks to Javascript to speed up homepage load time