Refactor detail activity.