Modified extract_utils and loop.

Cleaned up some functions. Loop now runs and saves data every 15 minutes.