Slight internal refactoring