Solve native problems

Future way to go:
Drop native and use java.Math.Biginteger instead.