Refactoring main data structures (added Multiplex and Multilayer)