refactoring

move logic out of AlchemyController and TermsController into new TextAnalyzer object

move generation of csv out of controller and into separate function