Move isValid up; Remove redundant comments