Reintroduced solution validation

* Implemented new validity check for solutions