split files into logical definitions