Shorten conditional statement
Rename misleading variable
Safeguard assignment
Remove unnecessary line
Remove unused argument
Fix validate return value bug