Maybe fix power hungry finished quarries.

I don't even know anymore, this code a plate of spaghetti that when I pull a string it turns out someone cut it into 1000 little pieces. I am not at my desktop where I actually have a dev environment to test this, if someone wants to point out what I did right and wrong, that would be great.