minor improvements to satinstance
Removed instance.n and replaced with more semantically sound len(instance.variables)