Moving a couple utility functions