added code to copy the uploaded template to /public directory
updated index link to point to uploaded-copy newsletter
optimized code complexity of the methods