box2d refactoring