fixed undefined constants errors
added method processArticle
dded storing of results in db