Re-engineering RPG Legacy Applications