SEVERE CODE CLEANUP AND COMMENTING IN BETTING.