Make S3 upload data work for new project pages; add comments and docstrings