Extracts main classes and interfaces.