Removed some unused code and seperated a method to extract emotion