Implementing Text Field, refactoring