Preprocessor altered as running out of memory so needs to be a bit more memory conscious