moved interface logic into directory