Performance upgrade

Faster solving, smarter solving