Refactor mpileup