merged code cleaning