Started refactoring of data analysis based on new data format