Rewrote and removed unnecessary javascript code. Implemented behaviour of the result button and textareas with result css and html code