Combined solver and graphics. Need to be fixed