Rewrite parts of the upload process

Signed-off-by: Darkrulerz <Dark_rulerz@hotmail.com>