Optimize imports

Plus a little bit of (private) code formatting/refactoring because of a DataModel 2.0 change.