Use tundra.createRequestFunction, other cleanup
Merge util functions into single file