Misc Go functions that didn't fit anywhere else :)