Added addPage and removePage to json api