extract code parts in files; new headers