branch code cleaning