Move DOM initialization into its own function.
Get rid of $ signs in variable names.