Some progress on Step 6. Need to fix recursive case.