variable naming and declaration cleanup

Reduce to just one var statement, and convert snake_case variable names to
camelCase.