onload, some coding style fixes