Remove if-let, redundant checks and add black boxes.