Changes to support custom commands sent to each window