JS refactored. DB settings for track.php