Slightly condense some logic, fix a comment