Refactor Code with Contao API