Refactoring

After a lot of commits, refactoring the most part of the imports, ready to push master so that the upcoming releases will be by smaller functional branches