Added stage1 splitting for if and let to the code.