Add plan saving; adding repositories; tests