Map eviction code cleanup & refactorings

Map eviction code cleanup & refactorings