Api updates

Api code is now simplified and new word count class added