Fix issue with statistics not fully working correctly
Small code cleanup
Fix for map, code refactor

[#66829192]