Refactoring bi/commands