MainActivity: better timer handling