Added save function and some more slight modifications
Added save function and some more slight modifications