Refactoring tbl_tracking.php