Refactor Api to use Problem and Solution Objects