Made flash function, K resume working

Now when setting a new k value, it pulls the old k value to edit rather
than continuing with whatever was last running. Also made a flash
function to clean up code. Need to make durations into an array, make
them adjustable, and make them savable to EEPROM.