cleanup and new format for core