Tried to cleanup with jlint syntax checker