word count working. Response data ready. Chased down bug in main.js
renamed and moved some logic to different js files