helper/command: remove unused functions and make static local ones