settlement module code review