generate_inputs changes

The algorithm used in generate_inputs has changed substantially. It now gives much more even outputs. It is also much more complicated, so some further testing should probably be done sometime when it isn't 1AM.