Split transaction end into two procedures

Changes the end of a transaction by making the "upload to server" task a separate call.