Fix and simplify upload + integrate json builder