Minor adjustments

Made some comments, minor styling adjustments
Fixed upload page

Added if function to make sure category and file are set before
inserting into db