Moved all automatic commands to new function auto_mode() from main() // cleaned returns to smooth function flow and processing