Help with Arduino program

There's the debouncing problem though...

True, but what OP wanted to do in each mode was going to take time, so debouncing would be handled by that.