Moved utility functions to /utils