Change a few functions to take a record instead of many arguments
Add a case for warning responses