Rewrote upload script