Refactor and implement another version of the problem state
Minor fixes
f
Some fixes