Preliminary refactorings to make programming interface cleaner.