Added better tolerance values for miller-rabin certainty, removed fermats test, removed code causing compiler warnings