Centralized some functions in Utils.ml