Fixed idiotic bug in MathUtil.getInverseModP. Of course we can't return -1 if the inverse doesn't exists since the inverse itself might be -1! Returning 0 instead, since the multiplicative inverse is never 0.
Wrote randomized method for finding irreducible polynomials. Too bad that it's very slow for any degrees larger than 20 and any other characteristics than 2...