Use new loadmat wrapper
Move writeSeriesConfig to seriesloader