Switch to camelCase as per docs

Move variables to top of scope

Functions as variables

Strictness
Holdover variables switched to camelCase
Need to define function before calling it, whoops