Refactoring devise