Write callbacks as class methods to accomodate PHP 5.3