Remove outdated comment
Inline extra function call
Optimize conditions