Streamline onload() function.