added run from bash script. clean up some code. flash gaia everytime