Thor refactoring