converted the whole mess to Python to get decent large integer support
updated manual