Refactor sclib
Modify hashmap