Refactored activities php to pull activities data from local database instead of rest api.
Refactored js script to pull data every five minutes and update the counter every second using the deltas array numbers.