fixed "infinite loop" bug, bankHistory fix

code no longer locks up on certain iterations.  The bankHistory wouldn't
show the full winnings (ex. if you want to make $50 and your bank was
$500, it would often stop before $550.).  General code
cleanup/reformatting.