Model Based Reverse Engineering With Restructuring