fixed the white spacing issues and seprated methods for error handling and nunjucks into their own files removing the commented out nunjucks code