Fix rest export function. Remove unused buttons.