Lint; and maybe make things clearer maybe

Hopefully renaming the `type` variable to `typeNum` is clearer.

Test Plan: make lint from webapp

Auditors: brianmerlob, alpert