refactoring model

Model has been refactored to have a separate ui model from the
underlying master data model.