commands-file: misc code clean-up