Fixed a couple of compile issues and added some exception handeling to the data pre-processor