added main function
Fixed pandigital-check, replaced several Int/Integer by Integral-typeclass