More working, less repeats

Generator generates what it's supposed to generate. Things have been cleaned up and finalized a bit. Everything seems to be working this time.