Refactorization. Added performing segue and responding to field selection.