Remove unnecessary checks
Simplify logic
Update tests