Interface and code refactoring