major refactoring with use of cloud modules