Rewrote solution storage

 * Got rid of StoredSolution
 * Fixed a memory leak with the old implementation