Refactored UI code in SingleResultActivity