Refactored betting implementation and validation