Major refactoring, remove summary and better handling of arrays/dataframes