Resolve jsHint errors and fix formatting to project standard.