database changes and emotions refactor