WORDS-267	Refactor index.jsp and wordcounter.js