Refactor createInstrumentCommand().