Performing code cleanup and calculating code metrics