Finally got mode choosing correct

Scrapped the old functions, made cleaner, stripped down new ones.
Got rid of setTimeout method, now it’s more elegant.