changed models, added PUT methods, and uses JSON in response instead of form