Move logic out of view. Update home page to only show 10 most recent calorie logs