Code refactoring & small change to one of the variable declarations.

Removed some unnecessary brackets from the "string_input" variable declaration.
Cached the document to save us re-calling the DOM every time - a little performance gain + makes the code a little tidier.