Improving cow welfare and the environmental impact of farming