Added some simple type checking. moved processing script to data source.