Medium refactoring