Rewrite to get box2d support