Refactoring to tests and load profile manager