Remove more unused code
Support configurable map type