Some refactoring, more interfaces...