refactoring api for classmodel and start to fix reverse Engineering