Ensure all JavaScript classes are initialized window.onload

Signed-off-by: Mark Somerville <mark@crocodile.is>