Preprare solution integrity checking.

The solution checking is now prepared to be implemented. Preparation
included generalization of the integrity check itself as well as
enriching the reference inteface.
Add exists check to solution integrity.