fix response for staging files and some refactoring
Begin arcbot message
This merge request is automatically copied from !729 (merged) orginally made by @dcameron
End arcbot message
Begin arcbot message
This merge request is automatically copied from !729 (merged) orginally made by @dcameron
End arcbot message