Lessons from 6 software rewrite stories