Moved onload things to the bottom so it works.