Cleaned up the code.
Automode timer now takes the view jumping time into account.