Made mode and physics optional, and added a verify method.