Fixed the document upload function and styled the template.