Redid code structure