Prevent repeated DOM searches for input fields

Assign variables to the text field, image and submit button
so that we don't keep searching the DOM for the same elements
every time a key is pressed or the text field for character
name is updated in some way.