HandleMap modernization

Modernize the creaky old HandleMap class