Refactoring script that supports lecture on DEA by gType and simplified devStage