Fixing bug with identical bids

Also added some basic test cases (woot testing)