cleanup class and add hooks like core conf