Refactoring using better object model