Moved certain functions to commons.h and string_utils.h