physics API cleanup; added sphere-plane collision detection