Finished refactoring leave group. Need to fix the error conditions that the server sends back.