Changing event binding approaches, taking page code out of onload