Continue large refactor

Details:
- Complete more refactoring of level 2 functions to serve as guide for other functions.