Refactored interface to use extracted logic. BROKEN.