Javascript for word counting added