Refactor physics