Added loading and preprocessing of data.