Added tests and corrected infections checking.