Made table size and chain length runtime parameters because why not