Use if-let for data unwrapping
Fix PR comments