tbl_indexes.php refactored according to pear standards