Remove unused code
Remove unnecessary checks