Added sentence cleaning and made variable names clearer