Refactoring tbl_tracking.php

Hi Marc,
I have refactored the tbl_tracking.php file. I extracted the html content as methods to a separate library file.