PyPAM replaced with ctypes implementation.