Added code to respond to commands from new UI