Fixing bugs, introducing two stage process in inventory upload