Save/load algorithms to file sort of working