restructure core theme