Restructured code, addedstages