fixed support for texlua
Create base class for different callbacks