Tidy Up Instant Upload code. Now much more stable