Refactor + split classes and interfaces