More minor refactoring, removed redundant and unused code that was written back when the admin page actually uploaded a file separately from saving it to db.