Remove unnecessary checks and variables.