added contao3 support and rewrite something