Refactoring the Upload Photo Gallery classes.
This is a complete refactoring of the Java uploader.