Added some improvements in pre-analysis data transformation.