Refactor requesting of diet & weight data into an external, reusable library.