refactorings and fixes in saving the results and integration of plugins