[ref] Big refactoring part6 (WORKING)