Implemented flash operation
Flashing now works (including progress indication)