Added Contao 3 compatibility, some improovements