Heavy refactor of license import - Trying to decouple implementation from docstore code. Upload/Existing duality in this controller breaks encapsulation and makes it very hard to update the code