Minor changes to stage1.m