Word counted and some minor improvments