Cleaned up betting logic.