Refactoring tbl_change.php

Hi Marc,
I have refactored some parts of the tbl_change.php using extract method in this pull request.