Improve hashmap implementation
Selective imports
Const correctness
Const correctness and a fix for #3