simplify and jsHint conform