Added Gallery API stuff. Updated upload page.