Modified cleanCode and generateTree in an attempt to direct mutations to cleaner, more structued code. It worked, but now the cleaning after every cycle is killing to much code.