Moving all of the loose funcs into types.