Add some shared functions to utils