Function module refactored. Fixed the wrong usage of the HashMap, which order was important to the function resolve logic.