changes input to textarea and adds support for multiline code
refactors scrolling logic
adds js to scroll to end after adding empty line