Some compilation refactoring.