Moved around utility functions.