[Claims] Refactor controller code.