Error in code left over var

Also some where there is a error in the save function.