Removing "Similar code found in two :if_statement nodes"