Refactoring into various components, interfaces.