Added global roaststarted as well as the code for flash reads and writes