Completed TextInput class