add sort function - sort by status
refactoring MessageFragement
refactoring common functions
refactoring UserInterfaceUtil