Simplify generate_input
8827547
There is no need to check at every single run if the corpus isn't empty: just check it once in the __init__ instead.