Added scaling code and an optional card limit per run