Capped the sync timer at 20 intervals. Cleaned up the code a bit.