some cleanup work

prepare for unordered_map