Refactor details view controller