[elfimg-tool]: refactor code only.