refactoring and optimizing the contig-filtering steps.