clean up TimeTracker and tune up the location service code