Added solution checking mechanisms.