[PATCH 17/24] binman: fit: Refactor to reduce function size