Working on adding idle command, note that some debugging code is enabled