Support for facts uploading
Refactoring of code