Refactoring physics